﻿using FakeItEasy.Sdk;
using SimpleInjector;

namespace Sustainalytics.Auth.Service.Tests
{

    public class AutoMockingContainer : Container
    {
        public AutoMockingContainer()
        {
            ResolveUnregisteredType += (sender, e) =>
            {
                var type = e.UnregisteredServiceType;
                e.Register(Lifestyle.Singleton.CreateRegistration(type, () => Create.Fake(type), this));
            };
        }
    }
}